<?php
include('../../inc/global.inc');
include("../islogin.php");
if($_POST[act]){
//start sent email
		       
			   
					 $content=iconv("utf-8","gb2312","<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>三帝贸易网邮件系统</title>
<style type='text/css'>
<!--
td,input,button,select,body {font-family:'lucida Grande',Verdana;font-size:12px;}
h1,h2,h3,h4,h5,h6 {font-size:12px; font-weight:normal; margin:0;}
ul,li{list-style:none;}
form,body,ul,li {margin:0;padding:0;}
select,body,textarea {background:#fff;font-size:12px;}
select {font-weight:normal; font-size:12px; font-family:Tahoma;line-height:20px;}
textarea {width:540px;border:1px solid #718da6;padding:3px;font-family:'lucida Grande',Verdana;}
img {border:none}
a {text-decoration:none;cursor:pointer;outline:none;}
a:hover {text-decoration:underline;}
-->
</style>
</head>
<body>
<div id='mailContentContainer' style='font-size:14px;padding:0;height:auto;min-height:auto;font-family: 'lucida Grande',Verdana;'>
  <div>
    <div style='COLOR: #000'>
      <table cellspacing='0' cellpadding='0' width='650' align='center' border='0'>
        <tbody>
          <tr>
            <td width='124'><img height='57' alt='三帝招聘' src='http://www.sandib2b.cn/mail-img/logo.gif' width='131' border='0'></td>
            <td valign='bottom'><table cellspacing='0' cellpadding='0' width='100%' border='0'>
              <tbody>
                <tr>
                  <td height='26'></td>
                  <td width='15'><img height='8' src='http://www.sandib2b.cn/mail-img/hdian.gif' width='8'></td>
                  <td align='left' width='42'><a class='blue14' href='http://job.sandib2b.cn' target='_blank'>招聘</a></td>
                  <td width='15'><img height='8' src='http://www.sandib2b.cn/mail-img/hdian.gif' width='8'></td>
                  <td align='left' width='42'><a class='blue14' href='http://job.sandib2b.cn' target='_blank'>求职</a></td>
                </tr>
              </tbody>
            </table></td>
          </tr>
        </tbody>
      </table>
      <table cellspacing='0' cellpadding='0' width='650' align='center' background='http://www.sandib2b.cn/mail-img/top3.jpg' border='0'>
        <tbody>
          <tr>
            <td style='PADDING-RIGHT: 0px; PADDING-LEFT: 35px; PADDING-BOTTOM: 0px; LINE-HEIGHT: 31px; PADDING-TOP: 32px; HEIGHT: 124px; TEXT-ALIGN: left'>尊敬的用户您好：<br>
              &nbsp; &nbsp; 三帝贸易网 - 招聘网开通了，我们全程为您免费发布招聘，求职信息。<br>
            &nbsp; &nbsp; 如果您现在需要招聘人才，找工作就上三帝贸易网!</td>
          </tr>
        </tbody>
      </table>
      <table class='table1' cellspacing='0' cellpadding='0' width='650' align='center' border='0'>
        <tbody>
          <tr>
            <td width='43' valign='top'><img height='249' src='http://www.sandib2b.cn/mail-img/left1.jpg' width='43'></td>
            <td style='BACKGROUND: url(http://www.sandib2b.cn/mail-img/bg2.jpg) repeat-x' valign='top' align='left' width='564'><br />
            <table cellspacing='0' cellpadding='0' width='564' border='0'>
              <tbody>
                <tr>
                  <td height='9'></td>
                </tr>
                <tr>
                  <td style='PADDING-LEFT: 60px; BACKGROUND: url(http://www.sandib2b.cn/mail-img/sign4.gif) no-repeat 26px 12px' align='left' height='50'><h2><a href='http://job.sandib2b.cn' target='_blank'>企业全程免费发布招聘人才信息。</a></h2></td>
                </tr>
                <tr>
                  <td style='PADDING-LEFT: 60px; BACKGROUND: url(http://www.sandib2b.cn/mail-img/sign4.gif) no-repeat 26px 12px' align='left' height='50'><h2><a href='http://job.sandib2b.cn' target='_blank'>设置精细的职位订阅搜索器</a></h2></td>
                </tr>
                <tr>
                  <td height='47' style='PADDING-LEFT: 60px; BACKGROUND: url(http://www.sandib2b.cn/mail-img/sign4.gif) no-repeat 26px 12px'><h2><a href='http://job.sandib2b.cn' target='_blank'>设置精细的职位订阅搜索器</a></h2></td>
                </tr>
                <tr>
                  <td height='58' align='right' valign='bottom' style='PADDING-RIGHT: 17px'><a href='http://job.sandib2b.cn'>Job.sandib2b.cn</a></td>
                </tr>
              </tbody>
            </table></td><td width='43' valign='top'><img height='249' src='http://www.sandib2b.cn/mail-img/right1.jpg' width='43'></td>
          </tr>
        </tbody>
      </table>
      <table cellspacing='0' cellpadding='0' width='650' align='center' border='0'>
        <tbody>
          <tr>
            <td style='FONT-SIZE: 12px; COLOR: #4690c1' align='middle' bgcolor='#d0e9f6' height='65'>&nbsp;</td>
          </tr>
        </tbody>
      </table>
      <div visibility='hidden'></div>
    </div>
  </div>
</div>
</body>
</html>");
					 $tomail=trim($_POST[box_mail]);
					 $box_title=iconv("utf-8","gb2312",$_POST[box_title]);
                    
					
					 sendmail($tomail,$box_title,$content);

//sent email end
echo "<script>alert('发布成功');location='job.php';</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>招聘网外发邮件系统</title>
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
</head>
</HEAD>
<BODY>
<center>
<form id="form1" name="form1" method="post" action="" onSubmit="return checkform()">
  <table width="721" height="54" border="0" align="center" cellpadding="0" cellspacing="0" class="ta">
    <tr>
      <td height="50" colspan="2" bgcolor="#EBEBEA"><h3>招聘网外发邮件系统</h3></td>
    </tr>
  </table>
  <table width="721" height="92" border="0" align="center" cellpadding="0" cellspacing="1" class="ta">
    <tr>
      <td width="116" height="26" align="center" bgcolor="#EBEBEA">邮箱地址</td>
      <td width="597" bgcolor="#FFFFFF"><textarea name="box_mail" cols="55" rows="6" id="box_mail"></textarea>请用";"隔开</td>
    </tr>
    <tr>
      <td width="116" height="30" align="center" bgcolor="#EBEBEA"><strong>邮件主题</strong></td>
      <td width="597" bgcolor="#FFFFFF"><input name="box_title" type="text" id="box_title" value="三帝招聘网您的免费招聘专家" size="40" maxlength="250"></td>
    </tr>
    <tr>
      <td height="36" colspan="2" align="center" bgcolor="#FAFAFA"><table width="70%" border="0" align="center" cellpadding="0" cellspacing="5">
          <tr>
            <td><input type="hidden" name="act" value="job.sandib2b.cn" /><input name="Submit" type="submit" class="picbutt" value="提交" /></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</BODY>
</HTML>

<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkform(){
if($("box_mail").value==""){
alert("邮箱不能为空");
$("box_mail").focus();
return false;
}
if($("box_title").value==""){
alert("邮件主题不能为空");
$("box_title").focus();
return false;
}
}
</script>